package cn.yuanqiao.archive.storeRoom.mapper;


import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.storeRoom.domain.Boxspec;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 档案盒规格Mapper接口
 * 
 * @author xy
 * @date 2023-06-19
 */
@Mapper
public interface BoxspecMapper 
{
    /**
     * 查询档案盒规格
     * 
     * @param specId 档案盒规格主键
     * @return 档案盒规格
     */
    public Boxspec selectBoxspecBySpecId(@Param("specId") Long specId, @Param("code")String code);

    /**
     * 查询档案盒规格列表
     * 
     * @param boxspec 档案盒规格
     * @return 档案盒规格集合
     */
    @DataScope(deptAlias = "d", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<Boxspec> selectBoxspecList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("boxspec") Boxspec boxspec);

    /**
     * 新增档案盒规格
     * 
     * @param boxspec 档案盒规格
     * @return 结果
     */
    public int insertBoxspec(Boxspec boxspec);

    /**
     * 修改档案盒规格
     * 
     * @param boxspec 档案盒规格
     * @return 结果
     */
    public int updateBoxspec(Boxspec boxspec);

    /**
     * 删除档案盒规格
     * 
     * @param specId 档案盒规格主键
     * @return 结果
     */
    public int deleteBoxspecBySpecId(@Param("specId")Long specId, @Param("code")String code);

    /**
     * 批量删除档案盒规格
     * 
     * @param specIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBoxspecBySpecIds(@Param("specIds")Long[] specIds, @Param("code")String code);

    public List<Boxspec> selectBoxspec(Boxspec boxspec);

    public Map<String, Object> getBoxSpecMap(@Param("ysInHe") int ysInHe, @Param("specId") Long spec_id, @Param("code")String code);

    public Integer getSpecAccountById(@Param("specId") Long spec_id, @Param("code")String code);

    List<Boxspec> selectBoxspecListByBox(Boxspec boxspec);
}
